package com.xxx.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
@ApiModel("用户信息")
public class User {
    private Long id;
    @ApiModelProperty("用户名")
    private String username;
    @JsonIgnore
    private String password;

    private String nickname;

    private String phoneNum;

    private String email;
    @ApiModelProperty("性别")
    private Byte gender;
    @JsonIgnore
    private String salt;
    @ApiModelProperty("头像地址")
    @JsonInclude(JsonInclude.Include.ALWAYS)//强制参与JSON序列化
    private String avatarUrl;

    private Integer articleCount;

    private Byte isAdmin;
    @ApiModelProperty("个人简介")
    private String remark;
    @JsonIgnore
    private Byte state;
    @JsonIgnore
    private Byte deleteState;

    private Date createTime;

    private Date updateTime;

}